package app.server.project.main.service.bo.event;

import cn.hutool.core.bean.BeanUtil;
import lombok.Data;

@Data
public class RankEvent {
    private int rankId;
    private long userId;
    private long val;
    private long sumVal;


    public static RankEvent of(DayRankEvent event, int rankId) {
        var ret = new RankEvent();
        BeanUtil.copyProperties(event, ret, true);
        return ret;
    }

    public static RankEvent ofInnerDay(DayRankInnerEvent event, int rankId) {
        var ret = new RankEvent();
        BeanUtil.copyProperties(event, ret, true);
        return ret;
    }

    public static RankEvent of(WeekRankEvent event, int rankId) {
        var ret = new RankEvent();
        BeanUtil.copyProperties(event, ret, true);
        return ret;
    }

    public static RankEvent ofInnerWeek(WeekRankInnerEvent event, int rankId) {
        var ret = new RankEvent();
        BeanUtil.copyProperties(event, ret, true);
        return ret;
    }
}
